<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>医院管理系统 - 主页</title>
    <link rel="stylesheet" href="/hospital_department/src/assets/css/bootstrap_5.3.2.min.css">
    <link rel="stylesheet" href="/hospital_department/src/assets/css/style.css">
</head>
<body>
<!-- 侧边栏 -->
<div class="sidebar">
    <a href="index.php" class="active">系统首页</a>
    <a href="<?= BASE_URL ?>index.php?c=department&a=index">科室信息</a>
    <a href="<?= BASE_URL ?>index.php?c=notice&a=index">公告管理</a>
    <a href="<?= BASE_URL ?>index.php?c=schedule&a=index">医生排班</a>
    <a href="<?= BASE_URL ?>index.php?c=manager&a=index">管理员信息</a>
    <a href="<?= BASE_URL ?>index.php?c=statistics&a=index">统计报表</a>
</div>

<!-- 主内容区域 -->
<div class="main-content">
    <!-- 顶栏 -->
    <div class="topbar">
        <h5 class="mb-0">医院管理系统</h5>
        <div class="topbar-right">
            <a href="index.php?c=login&a=logout" class="btn btn-danger logout-btn">退出登录</a>
        </div>
    </div>

    <!-- 欢迎信息 -->
    <div class="welcome-message mt-4 mb-4">
        <h3>欢迎使用医院管理系统</h3>
        <p>这里是医院管理系统的主页面，您可以从左侧菜单访问各个功能模块。</p>
    </div>

    <!-- 快捷操作按钮 -->
    <div class="quick-actions text-center mb-4">
        <div class="row">
            <div class="col-md-4">
                <a href="/hospital_department/index.php?c=department&a=index" class="btn btn-primary btn-lg btn-block">科室管理</a>
            </div>
            <div class="col-md-4">
                <a href="index.php?c=schedule&a=index" class="btn btn-success btn-lg btn-block">医生排班</a>
            </div>
            <div class="col-md-4">
                <a href="index.php?c=user&a=index" class="btn btn-info btn-lg btn-block">用户管理</a>
            </div>
        </div>
    </div>

    <!-- 统计信息 -->
    <div class="statistics">
        <h4 class="mb-3">系统统计信息</h4>
        <div class="row">
            <div class="col-md-4">
                <div class="card">
                    <div class="card-body">
                        <h5 class="card-title">科室总数</h5>
                        <p class="card-text"><?= htmlspecialchars($totalDepartments ?? 0) ?></p>
                    </div>
                </div>
            </div>
            <div class="col-md-4">
                <div class="card">
                    <div class="card-body">
                        <h5 class="card-title">医生总数</h5>
                        <p class="card-text"><?php echo htmlspecialchars($total_doctors ?? 0); ?></p>
                    </div>
                </div>
            </div>
            <div class="col-md-4">
                <div class="card">
                    <div class="card-body">
                        <h5 class="card-title">用户总数</h5>
                        <p class="card-text"><?php echo htmlspecialchars($total_users ?? 0); ?></p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<script src="/hospital_department/src/assets/js/bootstrap.bundle.min.js"></script>
</body>
</html>